package pkg4;

public class Test {
	 public static void main(String[] args) {
		  Fish niqiu = new Fish();
		  System.out.println(niqiu.weight);
		  Lake taihu  = new Lake();
		  Lake xihu = new Lake();
		  Lake yalujiang = new Lake();
		  Lake changjiang = new Lake();
		  taihu.setFish(niqiu);
		  xihu.setFish(niqiu);
		  yalujiang.setFish(niqiu);
		  changjiang.setFish(niqiu);
		  
		  taihu.eat(15);
		  System.out.println(niqiu.weight);
		  System.out.println(taihu.fish.weight);
		  System.out.println(xihu.fish.weight);
		  System.out.println(yalujiang.fish.weight);
		  System.out.println(changjiang.fish.weight);
		  
		  niqiu.eat(15);
		  System.out.println(niqiu.weight);
		  System.out.println(taihu.fish.weight);
		  System.out.println(xihu.fish.weight);
		  System.out.println(yalujiang.fish.weight);
		  System.out.println(changjiang.fish.weight);
		 }
}
